  $(document)
    .on("touchmove", function(e) {
      e.stopPropagation();
      e.preventDefault();
      if (!!this.move) {
        var posix = !document.move_target
            ? { x: 0, y: 0 }
            : document.move_target.posix,
          callback =
            document.call_down ||
            function() {
              var _touch = e.originalEvent.targetTouches[0];
              if (_touch.pageX < 120 || _touch.pageX > $("body").width() - 5) {
                return false;
              } else {
                $(this.move_target).css({
                  top: _touch.pageY - posix.y,
                  left: _touch.pageX - posix.x
                });
              }
            };
        callback.call(this, e, posix);
      }
    })
    .on("touchend", function(e) {
      e.stopPropagation();
      e.preventDefault();
      if (!!this.move) {
        var callback = document.call_up || function() {};
        callback.call(this, e);
        $.extend(this, {
          move: false,
          move_target: null,
          call_down: false,
          call_up: false
        });
      }
    });

  function changeDrage(target, drag) {
    // 多保留几位保证每个都不一样
    var $ele = Math.random().toFixed(20);
    $ele = $(target)
      .on("touchstart", function(e) {
        // e.stopPropagation();
        if (hhh == 1) {
          return;
        } else {
          e.preventDefault();
          $(this)
            .css({ "z-index": "100" })
            .siblings()
            .css({ "z-index": "1" });
          var _touch = e.originalEvent.targetTouches[0];
          var offset = $(this).offset();
          this.posix = {
            x: _touch.pageX - offset.left,
            y: _touch.pageY - offset.top
          };
          $.extend(document, { move: true, move_target: this });
        }
      })
      .on("touchstart", drag, function(e) {
        var _this = $(this);
        e.stopPropagation();
        e.preventDefault();
        var _touch = e.originalEvent.targetTouches[0];
        var posix = {
          w: _this.parent().width(),
          h: _this.parent().height(),
          x: _touch.pageX,
          y: _touch.pageY
        };
        $.extend(document, {
          move: true,
          call_down: function(e) {
            e.stopPropagation();
            e.preventDefault();
            var _touch = e.originalEvent.targetTouches[0];
            _this.parent().css({
              width: Math.max(30, _touch.pageX - posix.x + posix.w),
              height: Math.max(30, _touch.pageY - posix.y + posix.h)
            });
          }
        });
        return false;
      });
  }
